package com.example.util;

/**
 * Created with IntelliJ IDEA.
 * User: tao95
 * Date: 2017/5/8
 * Time: 14:51
 * To change this template use File | Settings | File Templates.
 * Description:
 */
public enum ErrorStatusEnum {

    /**
     * 枚举表
     *
     */
    SUCCESS(10000,"操作成功"),
    EDITPASSWPRD_SUCCESS(10001,"修改密码成功"),
    USER_NOT_IEXTS(20001,"管理员不存在" ),
    PASSWORD_ERROR(20002,"Tips:密码错误,请确认密码后重试" ),
    EDITPASSWPRD_FAILED(20003,"修改密码失败" ),
    ADD_ADMINFAIL(20004,"添加管理员失败" ),
    EDIT_ADMINFAIL(20005,"修改管理员失败" ),
    DEL_ADMINFAIL(20006,"删除管理员失败" ),
    ADD_COURSEFAIL(20007, "添加课程失败"),
    EDIT_COURSEFAIL(20008,"修改课程失败" ),
    DEL_COURSEFAIL(20009, "删除课程失败"),
    ADD_CLASSFAIL(20010,"添加班级失败" ),
    EDIT_CLASSFAIL(20011,"修改班级失败" ),
    DEL_CLASSFAIL(20012, "删除班级失败"),
    ADD_LABFAIL(20013,"添加实验室失败" ),
    EDIT_LABFAIL(20014,"修改实验室失败" ),
    DEL_LABFAIL(20015,"删除实验室失败" ),
    ADD_TEACHERFAIL(20016,"添加教师接口失败" ),
    EDIT_TEACHERFAIL(20017,"修改教师接口失败" ),
    DEL_TEACHERFAIL(20018,"删除教师失败" ),
    EDIT_CTRFAIL(20019,"修改课程失败" ),
    ADD_CTRFAIL(20020,"添加课程失败" ),
    DEL_CTRFAIL(20021,"修改课程失败" );


    /**
     * 构造器
     * @param errorCode
     * @param errorMsg
     */
    private ErrorStatusEnum(int errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    @Override
    public String toString() {
        return "ErrorStatus{" +
                "errorCode=" + errorCode +
                ", errorMsg='" + errorMsg + '\'' +
                '}';
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    private int errorCode;

    public int getErrorCode() {
        return errorCode;
    }

    private String errorMsg;

    public String getErrorMsg() {
        return errorMsg;
    }
}